package com.atguigu.springcloud.controller;


import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.zookeeper.discovery.ZookeeperDiscoveryClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

@RestController
@Slf4j
public class OrderController {
    //public static final String PAYMENT_URL= "http://localhost:8001";
    public static final String PAYMENT_URL= "http://cloud-provider-payment";


    @Autowired
    private RestTemplate restTemplate;

    @GetMapping("/consumer/payment/zk")
    public Object create(){
        return restTemplate.getForObject(PAYMENT_URL+"/payment/zk", Object.class);

    }
}
